;;; init-linum.el -*- lexical-binding: t; -*-

(use-package nlinum
  :if (unless *version-26+*)
  :init
  (setq nlinum-highlight-current-line t)
  (setq nlinum-format "%4d")
  :config
  (if canary\global-line-numbers
      (progn
        (global-nlinum-mode))
    (progn
      (add-hook 'prog-mode-hook 'nlinum-mode)
      (add-hook 'text-mode-hook 'nlinum-mode))))

(use-package display-line-numbers
  :defer t
  :if *version-26+*
  :init
  (setq display-line-numbers-type t)
  :config
  (add-hook 'emacs-startup-hook
            (lambda ()
              (if canary\global-line-numbers
                  (progn
                    (global-display-line-numbers-mode))
                (progn
                  (add-hook 'prog-mode-hook 'display-line-numbers-mode)
                  (add-hook 'text-mode-hook 'display-line-numbers-mode))))))

(provide 'init-linum)
